<html>
<body bgcolor="#000000" text="#FFFFFF">
<body bgcolor="#000000" text="#FFFFFF">
<?
include("config.php");
$query = 'select G_Name,G_Master,G_Score,G_Notice from Guild order by G_Score  desc';
$result = mssql_query( $query );
?>

<table width="450" border="0" cellpadding="0" cellspacing="0">
  <!--DWLayoutTable-->
  <tr>
    <td width="450" height="668" valign="top"><div align="center" class="style3">Top
        das 50 melhores Guilds</div>      
      <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
        <!--DWLayoutTable-->
      <tr>
        <td align="center" valign="middle" bgcolor="#000000"><table width="450" border="1" cellpadding="0" cellspacing="0" bordercolor="#999999" bgcolor="#000000">
          <!--DWLayoutTable-->
		    <tr><td height="21"><div align="center"><span class="style4">N°</span></div></td><td bgcolor="#000000"><div align="center"><span class="style4"><font color="#FFFFFF">Guild</font></span></div></td><td><div align="center"><span class="style4">Lider</span></div></td>
		      <td width="55" valign="top"><div align="center"><span class="style4">Vitorias</span></div>
		      </td>
		      <td width="226" valign="top"><div align="center"><span class="style4"><font color="#FFFFFF" size="2">Guild Mensagem</font></span></div></td>
		      </tr>
            <?
		for($i=0;$i < mssql_num_rows($result);++$i)
			{
			$row = mssql_fetch_row($result);
			$rank = $i+1;
			echo "<tr>
			  <td valign=top align=left bgcolor=#000000 class=style1><FONT SIZE=2 face=Arial font color=ffffff>$rank</td></font>
              <td valign=top align=left bgcolor=#000000 class=style1><FONT SIZE=2 face=Arial font color=ffffff><div align=center>$row[0]</td></font></div>
              <td valign=top align=left bgcolor=#000000 class=style1><FONT SIZE=2 face=Arial font color=FFFF00><div align=center>$row[1]</td></font></div>
              <td valign=top align=left bgcolor=#000000 class=style1><FONT SIZE=2 face=Arial font color=ffffff><div align=center>$row[2]</td></font></div>
			  <td valign=top align=left bgcolor=#000000 class=style1><FONT SIZE=2 face=Arial font color=ffffff><div align=center>$row[3]</td></font></div>
              </tr>";
			}
		?>
        </table>
        <br>
        <input name="Button" type="button" class="campos" value="Atualizar" onClick="javascript:window.location='rankclanes.php'"></td>
      </tr>
      <tr>
        <td height="564"></td>
      </tr>
      </table>
    </td>
  </tr>
</table>
</body>
</html>